<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
{% extends "base.html" %}
{% load staticfiles %}

{% block title %}
    通知
{% endblock title %}

{% block content %}
    <div class="container">
        <div class="row mt-4 ml-4">
            <a href="{% url "notice:update" %}" class="btn btn-warning" role="button">清空所有通知</a>
        </div>
        <!-- 未读通知列表 -->
        <div class="row mt-2 ml-4">
            <ul class="list-group">
                {% for notice in notices %}
                    <li class="list-group-item" id="notice_link">
                        <a href="{% url "notice:update" %}?article_id={{ notice.target.id }}&notice_id={{ notice.id }}"
                           target="_blank"
                        >
                    <span style="color: #5897fb;">
                        {{ notice.actor }}
                    </span>
                            在 <span style="color: #01a252;">{{ notice.target }}</span> {{ notice.verb }}。
                        </a>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ notice.timestamp|date:"Y/m/d H:i" }}
                    </li>
                {% endfor %}
            </ul>
        </div>
    </div>

    <style>
        #notice_link a:link {
            color: black;
        }

        #notice_link a:visited {
            color: lightgrey;
        }
    </style>
{% endblock content %}
</body>
</html>